3.92 \(\int \frac{x^3 (a+b \log (c x^n))^2}{d+e x} \, dx\)

Optimal. Leaf size=271 \[ -\frac{2 b d^3 n \text{PolyLog}\left (2,-\frac{e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^4}+\frac{2 b^2 d^3 n^2 \text{PolyLog}\left (3,-\frac{e x}{d}\right )}{e^4}-\frac{d^3 \log \left (\frac{e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{e^4}+\frac{d^2 x \left (a+b \log \left (c x^n\right )\right )^2}{e^3}-\frac{d x^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e^2}+\frac{b d n x^2 \left (a+b \log \left (c x^n\right )\right )}{2 e^2}+\frac{x^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}-\frac{2 b n x^3 \left (a+b \log \left (c x^n\right )\right )}{9 e}-\frac{2 a b d^2 n x}{e^3}-\frac{2 b^2 d^2 n x \log \left (c x^n\right )}{e^3}+\frac{2 b^2 d^2 n^2 x}{e^3}-\frac{b^2 d n^2 x^2}{4 e^2}+\frac{2 b^2 n^2 x^3}{27 e} \]

[Out]

(-2*a*b*d^2*n*x)/e^3 + (2*b^2*d^2*n^2*x)/e^3 - (b^2*d*n^2*x^2)/(4*e^2) + (2*b^2*n^2*x^3)/(27*e) - (2*b^2*d^2*n
*x*Log[c*x^n])/e^3 + (b*d*n*x^2*(a + b*Log[c*x^n]))/(2*e^2) - (2*b*n*x^3*(a + b*Log[c*x^n]))/(9*e) + (d^2*x*(a
 + b*Log[c*x^n])^2)/e^3 - (d*x^2*(a + b*Log[c*x^n])^2)/(2*e^2) + (x^3*(a + b*Log[c*x^n])^2)/(3*e) - (d^3*(a +
b*Log[c*x^n])^2*Log[1 + (e*x)/d])/e^4 - (2*b*d^3*n*(a + b*Log[c*x^n])*PolyLog[2, -((e*x)/d)])/e^4 + (2*b^2*d^3
*n^2*PolyLog[3, -((e*x)/d)])/e^4

________________________________________________________________________________________

Rubi [A]  time = 0.276486, antiderivative size = 271, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 8, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.348, Rules used = {2353, 2296, 2295, 2305, 2304, 2317, 2374, 6589} \[ -\frac{2 b d^3 n \text{PolyLog}\left (2,-\frac{e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^4}+\frac{2 b^2 d^3 n^2 \text{PolyLog}\left (3,-\frac{e x}{d}\right )}{e^4}-\frac{d^3 \log \left (\frac{e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{e^4}+\frac{d^2 x \left (a+b \log \left (c x^n\right )\right )^2}{e^3}-\frac{d x^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e^2}+\frac{b d n x^2 \left (a+b \log \left (c x^n\right )\right )}{2 e^2}+\frac{x^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}-\frac{2 b n x^3 \left (a+b \log \left (c x^n\right )\right )}{9 e}-\frac{2 a b d^2 n x}{e^3}-\frac{2 b^2 d^2 n x \log \left (c x^n\right )}{e^3}+\frac{2 b^2 d^2 n^2 x}{e^3}-\frac{b^2 d n^2 x^2}{4 e^2}+\frac{2 b^2 n^2 x^3}{27 e} \]

Antiderivative was successfully verified.

[In]

Int[(x^3*(a + b*Log[c*x^n])^2)/(d + e*x),x]

[Out]

(-2*a*b*d^2*n*x)/e^3 + (2*b^2*d^2*n^2*x)/e^3 - (b^2*d*n^2*x^2)/(4*e^2) + (2*b^2*n^2*x^3)/(27*e) - (2*b^2*d^2*n
*x*Log[c*x^n])/e^3 + (b*d*n*x^2*(a + b*Log[c*x^n]))/(2*e^2) - (2*b*n*x^3*(a + b*Log[c*x^n]))/(9*e) + (d^2*x*(a
 + b*Log[c*x^n])^2)/e^3 - (d*x^2*(a + b*Log[c*x^n])^2)/(2*e^2) + (x^3*(a + b*Log[c*x^n])^2)/(3*e) - (d^3*(a +
b*Log[c*x^n])^2*Log[1 + (e*x)/d])/e^4 - (2*b*d^3*n*(a + b*Log[c*x^n])*PolyLog[2, -((e*x)/d)])/e^4 + (2*b^2*d^3
*n^2*PolyLog[3, -((e*x)/d)])/e^4

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin{align*} \int \frac{x^3 \left (a+b \log \left (c x^n\right )\right )^2}{d+e x} \, dx &=\int \left (\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^2}{e^3}-\frac{d x \left (a+b \log \left (c x^n\right )\right )^2}{e^2}+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{e}-\frac{d^3 \left (a+b \log \left (c x^n\right )\right )^2}{e^3 (d+e x)}\right ) \, dx\\ &=\frac{d^2 \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx}{e^3}-\frac{d^3 \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{d+e x} \, dx}{e^3}-\frac{d \int x \left (a+b \log \left (c x^n\right )\right )^2 \, dx}{e^2}+\frac{\int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx}{e}\\ &=\frac{d^2 x \left (a+b \log \left (c x^n\right )\right )^2}{e^3}-\frac{d x^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e^2}+\frac{x^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}-\frac{d^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac{e x}{d}\right )}{e^4}+\frac{\left (2 b d^3 n\right ) \int \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{e x}{d}\right )}{x} \, dx}{e^4}-\frac{\left (2 b d^2 n\right ) \int \left (a+b \log \left (c x^n\right )\right ) \, dx}{e^3}+\frac{(b d n) \int x \left (a+b \log \left (c x^n\right )\right ) \, dx}{e^2}-\frac{(2 b n) \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx}{3 e}\\ &=-\frac{2 a b d^2 n x}{e^3}-\frac{b^2 d n^2 x^2}{4 e^2}+\frac{2 b^2 n^2 x^3}{27 e}+\frac{b d n x^2 \left (a+b \log \left (c x^n\right )\right )}{2 e^2}-\frac{2 b n x^3 \left (a+b \log \left (c x^n\right )\right )}{9 e}+\frac{d^2 x \left (a+b \log \left (c x^n\right )\right )^2}{e^3}-\frac{d x^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e^2}+\frac{x^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}-\frac{d^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac{e x}{d}\right )}{e^4}-\frac{2 b d^3 n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-\frac{e x}{d}\right )}{e^4}-\frac{\left (2 b^2 d^2 n\right ) \int \log \left (c x^n\right ) \, dx}{e^3}+\frac{\left (2 b^2 d^3 n^2\right ) \int \frac{\text{Li}_2\left (-\frac{e x}{d}\right )}{x} \, dx}{e^4}\\ &=-\frac{2 a b d^2 n x}{e^3}+\frac{2 b^2 d^2 n^2 x}{e^3}-\frac{b^2 d n^2 x^2}{4 e^2}+\frac{2 b^2 n^2 x^3}{27 e}-\frac{2 b^2 d^2 n x \log \left (c x^n\right )}{e^3}+\frac{b d n x^2 \left (a+b \log \left (c x^n\right )\right )}{2 e^2}-\frac{2 b n x^3 \left (a+b \log \left (c x^n\right )\right )}{9 e}+\frac{d^2 x \left (a+b \log \left (c x^n\right )\right )^2}{e^3}-\frac{d x^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e^2}+\frac{x^3 \left (a+b \log \left (c x^n\right )\right )^2}{3 e}-\frac{d^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac{e x}{d}\right )}{e^4}-\frac{2 b d^3 n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-\frac{e x}{d}\right )}{e^4}+\frac{2 b^2 d^3 n^2 \text{Li}_3\left (-\frac{e x}{d}\right )}{e^4}\\ \end{align*}

Mathematica [A]  time = 0.162462, size = 211, normalized size = 0.78 \[ -\frac{216 b d^3 n \left (\text{PolyLog}\left (2,-\frac{e x}{d}\right ) \left (a+b \log \left (c x^n\right )\right )-b n \text{PolyLog}\left (3,-\frac{e x}{d}\right )\right )+108 d^3 \log \left (\frac{e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-108 d^2 e x \left (a+b \log \left (c x^n\right )\right )^2+216 b d^2 e n x \left (a+b \log \left (c x^n\right )-b n\right )+54 d e^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2+27 b d e^2 n x^2 \left (b n-2 \left (a+b \log \left (c x^n\right )\right )\right )-36 e^3 x^3 \left (a+b \log \left (c x^n\right )\right )^2-8 b e^3 n x^3 \left (b n-3 \left (a+b \log \left (c x^n\right )\right )\right )}{108 e^4} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^3*(a + b*Log[c*x^n])^2)/(d + e*x),x]

[Out]

-(-108*d^2*e*x*(a + b*Log[c*x^n])^2 + 54*d*e^2*x^2*(a + b*Log[c*x^n])^2 - 36*e^3*x^3*(a + b*Log[c*x^n])^2 + 21
6*b*d^2*e*n*x*(a - b*n + b*Log[c*x^n]) - 8*b*e^3*n*x^3*(b*n - 3*(a + b*Log[c*x^n])) + 27*b*d*e^2*n*x^2*(b*n -
2*(a + b*Log[c*x^n])) + 108*d^3*(a + b*Log[c*x^n])^2*Log[1 + (e*x)/d] + 216*b*d^3*n*((a + b*Log[c*x^n])*PolyLo
g[2, -((e*x)/d)] - b*n*PolyLog[3, -((e*x)/d)]))/(108*e^4)

________________________________________________________________________________________

Maple [F]  time = 0.749, size = 0, normalized size = 0. \begin{align*} \int{\frac{{x}^{3} \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) ^{2}}{ex+d}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a+b*ln(c*x^n))^2/(e*x+d),x)

[Out]

int(x^3*(a+b*ln(c*x^n))^2/(e*x+d),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{1}{6} \, a^{2}{\left (\frac{6 \, d^{3} \log \left (e x + d\right )}{e^{4}} - \frac{2 \, e^{2} x^{3} - 3 \, d e x^{2} + 6 \, d^{2} x}{e^{3}}\right )} + \int \frac{b^{2} x^{3} \log \left (x^{n}\right )^{2} + 2 \,{\left (b^{2} \log \left (c\right ) + a b\right )} x^{3} \log \left (x^{n}\right ) +{\left (b^{2} \log \left (c\right )^{2} + 2 \, a b \log \left (c\right )\right )} x^{3}}{e x + d}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*log(c*x^n))^2/(e*x+d),x, algorithm="maxima")

[Out]

-1/6*a^2*(6*d^3*log(e*x + d)/e^4 - (2*e^2*x^3 - 3*d*e*x^2 + 6*d^2*x)/e^3) + integrate((b^2*x^3*log(x^n)^2 + 2*
(b^2*log(c) + a*b)*x^3*log(x^n) + (b^2*log(c)^2 + 2*a*b*log(c))*x^3)/(e*x + d), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b^{2} x^{3} \log \left (c x^{n}\right )^{2} + 2 \, a b x^{3} \log \left (c x^{n}\right ) + a^{2} x^{3}}{e x + d}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*log(c*x^n))^2/(e*x+d),x, algorithm="fricas")

[Out]

integral((b^2*x^3*log(c*x^n)^2 + 2*a*b*x^3*log(c*x^n) + a^2*x^3)/(e*x + d), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{3} \left (a + b \log{\left (c x^{n} \right )}\right )^{2}}{d + e x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(a+b*ln(c*x**n))**2/(e*x+d),x)

[Out]

Integral(x**3*(a + b*log(c*x**n))**2/(d + e*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} x^{3}}{e x + d}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*log(c*x^n))^2/(e*x+d),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2*x^3/(e*x + d), x)